package com.ciis.base;

import com.ciis.base.page.IPage;
import com.ciis.base.page.Page;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: zhangdajun
 * Date: 14-4-26
 * Time: 下午7:04
 * To change this template use File | Settings | File Templates.
 * 基础mapper，定义用于分页
 * 如果不继承该mapper，也可使用@Param(Constants.PAGE_KEY)与 @Param(Constants.PARAM) 分别声明该查询为分页查询
 */
public interface BaseMapper<T> {

    T get(Serializable pk);

    Page<T> findPage(@Param(Constants.PAGE_KEY)IPage<T> page,@Param(Constants.PARAM) T obj) throws Exception;
}
